<html>
    <head><title>Sistem Informasi Manajemen Adik Asuh</title>
        <link rel="shortcut icon" href="<?= base_url();?>system/image/icons/user-green.png" />
        <link rel="stylesheet" type="text/css" href="<?php echo base_url();?>system/css/login.css" />
        <script type="text/javascript">
            function cekisian(data) {
                if (data.username.value == "") {
                    hidealert.innerHTML = '<div class=\"alert\">Username tidak boleh kosong!</div>';
                    data.username.focus();
                    return false;
                }
                if (data.password.value == "") {
                     hidealert.innerHTML = '<div class=\"alert\">Password tidak boleh kosong!</div>';
                    data.password.focus();
                    return false;
                }
            }
        </script>
    </head>
    <body>
    <body>
        <center>
            <div id="logobrand">&nbsp;</div> 
            <div id="blueborder">
                <div id="content-user">
                      <form action="<?php echo site_url('login/cek_login');?>" method="post" onSubmit="return cekisian(this)">        
                               <i>Masukkan Username dan Password</i><br/><br/>
                               <?php
                                 $flashdata = $this->session->flashdata('message');
                                 $messages = isset ($flashdata)?pesan($flashdata):"";
                                 echo "$messages";
                               ?>
                               <div id="hidealert"></div>
                               <label>Username</label><br/>
                               <input type=text name="username" class="inputstyle"/><br/><br/><br/>
                               <label>Password</label><br/>
                               <input type="password" name="password" class="inputstyle"/>
                               <div class='clear'></div>
                               <center><br>
                                   <input type="hidden" name="last_link" value="<?=$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']?>">
                                   <input type=submit name="login_button" class="buttonstyle" value="LOGIN" style="float: none; width: 120px">
                               </center>
                       </form>
                </div>
            </div>
          
            <div class="footer">&copy; 2011. Yogyakarta Coin A Chance (YCAC)</div>
        </center>
    </body>
</html>